package edu.gatech.bsbmule.view;

import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;

/**
 * The GUI class that welcomes the players!
 * 
 * @author Vania, Hanjie, Melissa, Manav
 * @version 1.0 10/5/2013
 * 
 */
public class WelcomeScreen extends JPanel implements IWelcomeScreen {

	JButton btnAbout;
	JButton btnLoad;

	/**
	 * Create the panel.
	 */
	public WelcomeScreen() {
		setLayout(new GridLayout(4,1,10,30));
		setBorder(new EmptyBorder(20,20,20,20));

		JLabel lblNewLabel = new JLabel("M.U.L.E.");
		lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
		lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 96));
		add(lblNewLabel);

		btnAbout = new JButton("New Game");
		btnAbout.setFont(new Font("Tahoma", Font.PLAIN, 36));
		add(btnAbout, BorderLayout.SOUTH);
		
		btnLoad = new JButton("Load");
		btnLoad.setFont(new Font("Tahoma", Font.PLAIN, 36));
		add(btnLoad);

		JButton btnNewButton_1 = new JButton("About");
		btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 36));
		add(btnNewButton_1, BorderLayout.NORTH);

	}
	
	/**
	 * @see edu.gatech.bsbmule.IWelcomeScreen
	 */
	@Override
	public void setPlayButtonListener(MouseAdapter e) {
		btnAbout.addMouseListener(e);
	}
	
	/**
	 * @see edu.gatech.bsbmule.IWelcomeScreen
	 */
	@Override
	public void setLoadButtonListener(MouseAdapter e) {
		btnLoad.addMouseListener(e);
	}

}
